import request from '@/utils/request'

/**
 * 新增、修改评价类型
 * @param {object} data
 * @returns
 */
export function saveEvaluateType(data) {
  return request({
    url: '/api/v1/decorateType',
    method: data.id ? 'put' : 'post',
    data
  })
}
/**
 * 整改资料提交
 * @param {*} remark
 * @param {*} id
 * @returns
 */
export function submitAudit({ id, remarks }) {
  return request({
    url: `/api/v1/patrolQuestionRectify/uploadSubmit`,
    method: 'post',
    data: { id, remarks }
  })
}

/**
 * 审核提交
 * @param {*}
 * @returns
 */
export function saveAudit({ id, remarks, resultCode = 1 }) {
  return request({
    url: `/api/v1/patrolQuestionRectify/submit`,
    method: 'post',
    data: { id, remarks, resultCode }
  })
}

/**
 * 申请延期
 * @param {object} data
 * @returns
 */
export function saveDelayForm(data) {
  return request({
    url: `/api/v1/patrolQuestionRectify/applyExtension`,
    method: 'post',
    data
  })
}
